
<%@ page import="com.opeace.School" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'school.label', default: 'School')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-school" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		
        <h1>${schoolInstance.name}</h1>
		<table align="center" width="100%">
                  <tr>

		<td align="left" width="50%" style="vertical-align: top;">
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list school">
			
                                <g:if test="${schoolInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="school.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${schoolInstance}" field="name"/></span>
					
				</li>
				</g:if>
                          
				<g:if test="${schoolInstance?.address}">
				<li class="fieldcontain">
					<span id="address-label" class="property-label"><g:message code="school.address.label" default="Address" /></span>
					
						<span class="property-value" aria-labelledby="address-label"><g:fieldValue bean="${schoolInstance}" field="address"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${schoolInstance?.classes}">
				<li class="fieldcontain">
					<span id="classes-label" class="property-label"><g:message code="school.classes.label" default="Classes" /></span>
					
						<g:each in="${schoolInstance.classes}" var="c">
						<span class="property-value" aria-labelledby="classes-label"><g:link controller="schoolClass" action="show" id="${c.id}">${c?.name.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${schoolInstance?.contactName}">
				<li class="fieldcontain">
					<span id="contactName-label" class="property-label"><g:message code="school.contactName.label" default="Contact Name" /></span>
					
						<span class="property-value" aria-labelledby="contactName-label"><g:fieldValue bean="${schoolInstance}" field="contactName"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${schoolInstance?.contactPosition}">
				<li class="fieldcontain">
					<span id="contactPosition-label" class="property-label"><g:message code="school.contactPosition.label" default="Contact Position" /></span>
					
						<span class="property-value" aria-labelledby="contactPosition-label"><g:fieldValue bean="${schoolInstance}" field="contactPosition"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${schoolInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="school.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${schoolInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${schoolInstance?.phoneNumber}">
				<li class="fieldcontain">
					<span id="phoneNumber-label" class="property-label"><g:message code="school.phoneNumber.label" default="Phone Number" /></span>
					
						<span class="property-value" aria-labelledby="phoneNumber-label"><g:fieldValue bean="${schoolInstance}" field="phoneNumber"/></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${schoolInstance?.id}" />
					<g:link class="edit" action="edit" id="${schoolInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
                  <div class="fieldcontain ${hasErrors(bean: schoolInstance, field: 'classes', 'error')} ">
		
	
<ul class="one-to-many">
<li class="add">
<g:message code="school.classes.label" default="Classes" />
<g:link controller="schoolClass" action="create" params="['school.id': schoolInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'schoolClass.label', default: 'Class')])}</g:link>
</li>
</ul>

</div>
		 </td>
                  </tr>

	</table>
         <div class="nav" role="navigation">
			<ul>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
			</ul>
                      </div>
		
	</body>
</html>
